Preface: Use Baidu map when need secret key, request secret key need SHA1 value, so today summarizes how to get this value.Under normal circumstances:First, get the development version of SHA1:Here I directly use the command console provided by
When we upload and download files, it can easily lead to the lack of files, so how to solve this problem? Users usually check using the SHA1 value. Today small compilation teaches everybody how to examine the file the SHA1 value.
Detection
Md5sum
Usage: md5sum [options] ... [File] ...
Displays or checks the MD5 (128-bit) checksum.
If there is no file option, or if the file is "-", read from the standard input.
-B,--binary read in binary mode
-C,--check read the MD5 checksum from
Md5sumUsage: md5sum [options] ... [File] ...Displays or checks the MD5 (128-bit) checksum.If there is no file option, or if the file is "-", read from the standard input.
-B,--binary read in binary mode-C,--check read the MD5 checksum from the file
The example of this paper describes the Base64 encryption, MD5 encryption and SHA1 encryption implemented by JS. Share to everyone for your reference, specific as follows:
1, Base64 encryption
The Base64.js file is introduced into the page, and
{test Result}For string Hello, world!For SHA1, the result is: 0a0a9f2a6772942557ab5355d76af442f8f65e01{Test Code} PackageSup.orange.learn;Importjava.security.MessageDigest;Importjava.security.NoSuchAlgorithmException;/*** Created by Re-x on 11/4/14.*
Instance
Computes the SHA-1 hash of the string "Hello":
Definition and usage
The SHA1 () function computes the SHA-1 hash of the string.
The SHA1 () function uses the United States Secure Hash algorithm 1.
Explanation from RFC 3174-the US Secure
usually, the encryption algorithm used is simple and efficient, the key is short, the encryption and decryption speed is fast, the decoding is extremely difficult. This article describes the use of Md5/sha1,dsa,desede/des,diffie-hellman.
The
First, write in frontNow more and more API interface requirements are required to provide our project SHA1 value, the development version is currently not high, but the release is required. And the current positioning in the major app is also more
Because of different languages, the rules for encryption are slightly different. Then this problem in the Niang can not search a correct answer, hereby record. 1. First, the two basic algorithms need to be consistent, here are the basic rules of SHA1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.